<?php
/**
 * 星光影楼官方网站
 * 
 * @package 星光影楼
 * @author 时间茶馆
 * @version 1.0
 * @link http://www.xianhall.com
 */

if (!defined('__TYPECHO_ROOT_DIR__')) exit;
 $this->need('header.php');
 ?>

<div class="jumbotron">
    <img src="http://pic.qiantucdn.com/images/slideshow/567cb4132a015.jpg" alt="猴年" class="img-responsive">
</div>
<?php if ($this->is('index')):?>
<!-- 循环显示每个分类下面的数据 -->
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while ($category->next()): ?>
<div class="text-center xg_count">
    <h3><?php $category->name(); ?></h3>
    <img src="http://7fvba5.com2.z0.glb.clouddn.com/xg2.0/image/gduan.png">
    <h5><em><?php $category->description(); ?></em></h5>
</div>
<?php $this->widget('Widget_Archive@category-'.$category->mid, 'pageSize=4&type=category', 'mid='.$category->mid)->to($categoryPosts); ?>
<?php if ($categoryPosts):?>
<div class="row xg_photo">
<?php while ($categoryPosts->next()): ?>
    <div class="col-sm-3" src="<?php $categoryPosts->permalink() ?>">
        <div class="thumbnail">
            <img src="<?php echo img_postthumb($categoryPosts->cid); ?>" alt="<?php $categoryPosts->title() ?>">
            <div class="caption">
                <p><?php $categoryPosts->title() ?></p>
            </div>
        </div>
    </div>
<?php endwhile; ?>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
<?php $this->need('footer.php'); ?>
